package cn.itcast.mapper;

import cn.itcast.domain.User;
import org.apache.ibatis.annotations.*;

import java.util.List;

public interface UserMapper {
    @Select("select * from user")
    List<User>  findAll();

    @Insert("insert into user values (#{id},#{name},#{gender},#{age},#{address},#{qq},#{email})")
    int insertAdd(User user);

    void deleteById(String[] uid);

    @Select("select * from user where id=#{uid}")
    User findById(String uid);

    @Update("update user set gender=#{gender},age=#{age},address=#{address},qq=#{qq},email=#{email} where id=#{id} ")
    void updateById(User user);
}
